home *** CD-ROM | disk | FTP | other *** search
-
- function units_dot_alien_setup()
- units_setup(4,true,ENET_EFFECT_PS_SETUPSMOKE_SMALL,ENET_EFFECT_GEOMETRY_DOTALIENSHADOW)
- end
-
- function units_dot_alien_resetup()
- units_setup(4,true,nil,ENET_EFFECT_GEOMETRY_DOTALIENSHADOW)
- end
-
- function units_dot_alien_select()
- units_select(12,2)
- end
-
- function units_dot_alien_unselect()
- units_unselect()
- end
-
- function units_dot_alien_selectenemy()
- uniGetExecutor():addSimpleEffect(ENET_EFFECT_SELECTEDGEOMETRY_ENEMY)
- end
-
- function units_dot_alien_damaged()
- uniGetExecutor():applyDamage(uniGetLife())
- end
-
- function units_dot_alien_highlight()
- uniGetExecutor():addEffectWithRadius(ENET_EFFECT_GEOMETRY_HIGHLIGHT,15)
- end
-
- function units_dot_alien_explode()
- units_explode_small1_green()
- end
-
- function units_dot_alien_fire()
- uniSetLife(uniGetLife() / 6)
- local unit = uniGetExecutor()
- local gt = unit:getBone(ENBT_GUNTOWER)
- local sound = gt:play3DSound("dot_a_rotate.wav",1)
- waitDeath(gt:addRotationEffect(ENET_EFFECT_ROTATE_GUNTOWERTOTARGET,MATH_PI,uniGetTarget()))
- waitDeath(gt:getBone(ENBT_GUN):addRotationEffect(ENET_EFFECT_ROTATE_GUNTOTARGET,MATH_PI,uniGetTarget()))
- sound:stopSound()
- local firespots = {}
- firespots[0] = gt:getBone(ENBT_FIRE1,0)
- firespots[1] = gt:getBone(ENBT_FIRE1,1)
-
- waitDeath(gt:aimGun(0,MATH_PI / 3.0,uniGetTarget()))
- local i = 0
-
- gt:play3DSound("dot_a_fire.wav",0):destroy()
- for i = 0,2 do
- local shot1 = firespots[0]:addSimpleEffect(ENET_EFFECT_DOTALIENSHOT_FLY):executeCommand(ENC_FIRE1)
- local shot2 = firespots[0]:addBulletEffect(ENET_EFFECT_PS_DOTALIENSHOT)
- gt:gunRecoil(0,0.15,6)
- pause(0.1)
- local shot1_2 = firespots[1]:addSimpleEffect(ENET_EFFECT_DOTALIENSHOT_FLY):executeCommand(ENC_FIRE1)
- local shot2_2 = firespots[1]:addBulletEffect(ENET_EFFECT_PS_DOTALIENSHOT)
- gt:gunRecoil(1,0.15,6)
- pause(0.1)
- shot2:suspendedDestroy(1.5)
- shot2_2:suspendedDestroy(1.5)
- end
-
- unit:addFireArrow()
- end
-
- function units_dot_alien_move()
- end
-
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_MOVE,"units_dot_alien_move")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_FIRE1,"units_dot_alien_fire")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_FIRE2,"units_dot_alien_fire")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_SELECT,"units_dot_alien_select")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_SELECTENEMY,"units_dot_alien_selectenemy")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_UNSELECT,"units_dot_alien_unselect")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_SETUP,"units_dot_alien_setup")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_RESETUP,"units_dot_alien_resetup")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_DAMAGED,"units_dot_alien_damaged")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_EXPLODE,"units_dot_alien_explode")
- registerCommand(ENSCRIPTSET_DOT_ALIEN,ENC_HIGHLIGHT,"units_dot_alien_highlight")
-
- -- make description of unit
- desc = getEffectDescriptionP(ENET_UNIT_DOT_ALIEN)
- desc.ClassID = ENCLASS_MESHINSTANCE
- desc.EffectClassType = ENECT_GEOMETRY
- desc.FileName = "dot_alien.rmd"
- desc.ScriptSet = ENSCRIPTSET_DOT_ALIEN
- desc.MoveType = ENMOVE_NOTALLOWED
- desc.RenderType = ENRENDERTYPE_GEOMETRY
- desc.Material = ENMAT_RIGIDSKINNEDMESH
- desc.MaterialColors = units_materialcolors_human
-
- -- shadow
- desc = getEffectDescriptionP(ENET_EFFECT_GEOMETRY_DOTALIENSHADOW)
- desc.ClassID = ENCLASS_MESHINSTANCE
- desc.EffectClassType = ENECT_GEOMETRY
- desc.FileName = "dot_alien_shadow.rmd"
- desc.RenderType = ENRENDERTYPE_SHADOW
- desc.Material = ENMAT_SHADOW
- desc.MaterialColors = units_materialcolors_shadow
-
- -- register new unit to logic
- unitDesc = logic_getUnitDescP(28)
- unitDesc.group = 2
- unitDesc.order = 0
- unitDesc.unit_res_id = ENET_UNIT_DOT_ALIEN
- unitDesc.unit_icon_id = "Dot_a_small_normal.dds"
- unitDesc.active_id = "Dot_a_small_active.dds"
- unitDesc.pressed_id = "Dot_a_small_pressed.dds"
- unitDesc.small_icon_id = "Dot_l_stats.dds"
- unitDesc.big_icon_id = "Dot_a_big_normal.dds"
- unitDesc.HP = 4
- unitDesc.MP = 0
- unitDesc.WR = 2
- unitDesc.min_WR = 1
- unitDesc.WD = 1
- unitDesc.WR2 = 0
- unitDesc.min_WR2 = 0
- unitDesc.WD2 = 0
- unitDesc.ability = 1
- unitDesc.transport = 0
- unitDesc.value = 1
- unitDesc.race = 1
- unitDesc.fire_pause = 0.6
- unitDesc.move_pause = 0.5
- unitDesc.unit_info_scale = 0.07
- unitDesc.scn_name = "BUNKER"
-